﻿USE [[[Database_Name]]]
GO 

PRINT ''
PRINT 'Creating stored procedures for a table...'

IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[usp_SelectAllTable]') AND type in (N'P', N'PC'))

BEGIN
DROP PROCEDURE [dbo].[usp_SelectAllTable]
END


EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[usp_SelectAllTable]
AS
BEGIN
SET NOCOUNT ON;
SELECT * FROM [Table] 

END
'
GO 
